import axios from '@/utils/axios'


// /goods/catelist
export const goodsCateListReq = (currentPage=1,pageSize=9999) => {
    return axios.get('/goods/catelist',{
        params:{
            currentPage,
            pageSize,
        }
    })
}

//添加商品 /goods/add
export const goodsAddReq = (data) => {
    return axios.post('/goods/add',data)
}


//获取商品列表
export const getGoodsListReq = (data) => {
    return axios.get('/goods/list',{
        params:data
        
    })
}


//修改商品 /goods/edit
export const goodsEditReq = (data) => {
    return axios.post('/goods/edit',data)
}



//获取分类  /goods/catelist
export const getCateListReq = (data) => {
    return axios.get('/goods/catelist',{
        params:data
        
    })
}

//修改分类  /goods/editcate
export const editCateReq = (data) => {
    return axios.post('/goods/editcate',data)
}


//删除分类  /goods/delcate
export const delClassifyReq = (data) => {
    return axios.get('/goods/delcate',{
        params:{
            id:data
        }
    })
}